#include "CArea.h"
using namespace Content;

CArea::CArea()
{
  pAreaBox = new CHitBox(10.0f,10.f,0.5f);
  tileX = 0;
  tileY = 0;
  pAreaBox->setColor(255,255,255);
  left = 0;
  right = 0;
  top = 0;
  bottom = 0;
}

CArea::~CArea()
{
  delete pAreaBox; 
}

void CArea::setTileCoord(int x, int y)
{
  tileX = x;
  tileY = y;
  pAreaBox->setPos(x*10.0f,-0.5f,y*10.0f);
  pAreaBox->setColor(abs(x*10) % 255, abs(y*10) % 255, 0);
  pAreaBox->updateObject(1.0f,0.0f);
}
int CArea::getTileX()
{
  return tileX;
}

int CArea::getTileY()
{
  return tileY;
}